package com.liuyk.commonlib.network.request;

import java.io.File;

/**
 * 文件上传
 * <p>
 * Created by liuyakui on 2020-02-23.
 */
public abstract class BaseFileRequest extends BaseRequest {

    public BaseFileRequest(String url) {
        super(url);
    }

    public File getSingleFile() {
        return singleFile();
    }

    public File[] getMultipartFile() {
        return multipartFile();
    }

    //下面两个方法，选择一个实现
    //多文件上传
    protected abstract File[] multipartFile();

    //单个文件上传
    protected abstract File singleFile();
}
